import request from '@/utils/request'

// 查询课程分类列表
export function listFenlei(query) {
  return request({
    url: '/hatha/fenlei/list',
    method: 'get',
    params: query
  })
}

// 查询课程分类详细
export function getFenlei(id) {
  return request({
    url: '/hatha/fenlei/' + id,
    method: 'get'
  })
}

// 新增课程分类
export function addFenlei(data) {
  return request({
    url: '/hatha/fenlei',
    method: 'post',
    data: data
  })
}

// 修改课程分类
export function updateFenlei(data) {
  return request({
    url: '/hatha/fenlei',
    method: 'put',
    data: data
  })
}

// 删除课程分类
export function delFenlei(id) {
  return request({
    url: '/hatha/fenlei/' + id,
    method: 'delete'
  })
}
